package com.nuit.cxl.mybatistest2.controller;

import com.nuit.cxl.mybatistest2.pojo.Person;
import com.nuit.cxl.mybatistest2.service.PersonServiceImpl;
import com.nuit.cxl.mybatistest2.service.PersonServiceImpl2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @Autowired
    PersonServiceImpl personService;

    @Autowired
    PersonServiceImpl2 personService2;

    @RequestMapping("/hello")
    public Person hello(Integer id) {
//        System.out.println("name: " + name);
        personService2.getPersonById(id);
        return personService.getPersonById(id);
    }
}


